![]() |
DrawThemeMenuTitle |
||||
Header: | Appearance.h | Carbon status: | Supported | |
Draws a menu title.
OSStatus DrawThemeMenuTitle ( const Rect *inMenuBarRect, const Rect *inTitleRect, ThemeMenuState inState, UInt32 inAttributes, MenuTitleDrawingUPP inTitleProc, UInt32 inTitleData );
A pointer to a structure of type Rect. Before calling DrawThemeMenuTitle, set the rectangle to contain the entire menu bar in which the title is to be drawn, in global coordinates. The menu bar background is drawn in the rectangle passed in the inMenuBarRect parameter. Your application can call GetThemeMenuBarHeight to get the height of the menu bar.
A pointer to a structure of type Rect. Before calling DrawThemeMenuTitle, set the rectangle to contain the menu title, in global coordinates. The title background is drawn in the rectangle passed in the inTitleRect parameter. The width of this rectangle is determined by calculating the width of the menu title’s content and then calling GetThemeMenuTitleExtra to get the amount of padding between menu titles in the current theme; these two values are added together and added to the left edge of where the title should be drawn. The top and bottom coordinates of this rectangle should be the same as those of the inMenuBarRect parameter.
A value of type ThemeMenuState. Pass a constant specifying the state (active, selected, or disabled) in which to draw the menu title; see
Reserved. Pass 0.
A value of type MenuTitleDrawingUPP. Pass a universal function pointer to a menu title drawing function such as MenuTitleDrawingProcPtr, defining how to draw the contents of the menu title. The value of the inTitleProc parameter can be a valid universal function pointer or NULL.
An unsigned 32-bit integer. Provide any data to be passed in to the inUserData parameter of MenuTitleDrawingProcPtr.
A result code.
The DrawThemeMenuTitle function draws a theme-compliant menu title.
This function is available with Appearance Manager 1.0.1 and later.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)